<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      template="/web/layout/arearestrita.xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
	
	<ui:define name="bodyPrincipal">
				<p:panel id="panelAreaRestritaRamosAtividade" columns="2" style="width:100%">
					<f:facet name="header">
						<h:panelGrid columns="2" style="width:100%">
							<h:panelGrid style="width:100%;text-align:left">
								<h:outputText style="font-size:25px" value="RAMOS ATIVIDADE" />
							</h:panelGrid>
							<h:panelGrid style="width:100%;text-align:right">
								<p:commandLink value="NOVO" 
									action="#{ramoAtividadeBeanSession.novoRamo}"  />	
							</h:panelGrid>
						</h:panelGrid>
					</f:facet>
					<p:dataTable id="dtAreaRestritaRamosAtividade" paginator="true" rows="20"
					 	emptyMessage="Nenhum ramo Atividade cadastrado" 
					 		style="text-align:center"
					 		value="#{ramoAtividadeBeanSession.ramosList}" var="ramo">
						<p:column style="width:550px" headerText="Nome" filterBy="#{u.nome}" 
							filterMatchMode="contains">
							<p:commandLink action="#{ramoAtividadeBeanSession.abrirRamoSelecionado}">
								<h:outputText value="#{ramo.nome}" />
								<f:setPropertyActionListener target="#{ramoAtividadeBeanSession.ramoSelecionado}" 
									value="#{ramo}" />
							</p:commandLink>
						</p:column>
					</p:dataTable>
				</p:panel>
	</ui:define>
</ui:composition>